from api.api_cz import RechargeApi
from api.api_dlce import RegLoginApi
from api.api_kh import OpenAccountApi


class TzYwlc():
    def __init__(self, session):
        self.session = session
        self.api=RegLoginApi
        self.login=RegLoginApi
        self.kf=OpenAccountApi
        self.re_charge=RechargeApi
    def test01_img_verify_code(self, r, status_code):
        resp = self.api.get_img_verify_code(r)

    def test01_realname(self):
        # 实现登录接口
        self.login.user_login('15611111711', '123456')
        # 实现实名认证接口
        resp = self.kf.realname('萧炎', '450102199003078798')
        data = resp.json()

    def test01_get_recharge_verify_code(self, status_code, r):
        # 获取充值图片验证码
        response = self.re_charge.get_recharge_verify_code(r)

    def test01_tender(self):
        # 用户登录
        self.dl.user_login('15666666111', '123456')
        # 投资
        response = self.tz.tender(642, 1000)
